Repository navigation
feat: add per-profile recovery locks - #10910
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Send identifierAuthorizations as a list sharing one challenge per escrow (escrow #7): one proof per SIWE identifier the escrow has not enrolled, plus the enrolled-identifier proof for updates. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Acquire or renew the registration-service lease before every approval. The 6-minute lease outlives the 5-minute approval, so another operation can only take the lease after this one's approvals have expired. Co-authored-by: Cursor <cursoragent@cursor.com>
8cd9124 to
19c3300
Compare
…e-enrollment Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/mfa-recovery-controller/CHANGELOG.md # packages/mfa-recovery-controller/src/MfaRecoveryController.ts # packages/mfa-recovery-controller/src/escrow-providers/cubist-escrow-provider.test.ts # packages/mfa-recovery-controller/src/escrow-providers/cubist-escrow-provider.ts # packages/mfa-recovery-controller/src/identifier-auth.ts
…t' into feat/mfa-recovery-locks Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/mfa-recovery-controller/CHANGELOG.md
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/mfa-recovery-controller/CHANGELOG.md # packages/mfa-recovery-controller/src/MfaRecoveryController.test.ts # packages/mfa-recovery-controller/src/MfaRecoveryController.ts # packages/mfa-recovery-controller/src/identifier-auth.ts
|
Stale lockId after a failed acquire: confirmed. The client writes lockId to state before calling acquire. If the API returns 409 because another operation owns the lease, the stale ID stays in state. Medium severity. |
|
releaseLock() stuck on an expired lease: partly wrong. I said the API would return 404 on an expired lease. It doesn't. The API's DELETE returns 204 when the lease is absent, so an expired lease that nobody else took releases cleanly. The real remaining case is narrower: our lease expired, another operation took it, and DELETE returns 409. The client throws recovery_lock_conflict and keeps the stale lockId. It recovers only after the other operation releases. The fix is to clear lockId when release returns 409, since we no longer own the lease. Low-to-medium severity. |
|
Expired lease is a dead end on the approval path: confirmed. The API's PUT never recreates an expired lease and returns 409. The approval path (#authorizeMutation) renews with no fallback to acquire. Expired and owned-by-another both return 409, and the client maps both to recovery_lock_conflict, so it can't tell them apart. Medium severity. |
|
Stub doesn't match the real lock (tests/stubs.ts). StubRecoveryLockProvider.release silently succeeds for a non-owner (the real API returns 409), and the stub has no expiry, so the expired-renew path is never tested. |
Co-authored-by: Cursor <cursoragent@cursor.com>
fixed here |
Co-authored-by: Cursor <cursoragent@cursor.com>
fixed here |
Co-authored-by: Cursor <cursoragent@cursor.com>
fixed here by removing renew API. The acquire API will simply renew |
Co-authored-by: Cursor <cursoragent@cursor.com>
fixed here |
Explanation
RecoveryRegistrationLockProviderandacquireLock/renewLock/releaseLock.lockIdso retries and restarts reuse the lease. Release is blocked while a mutation is pending.Client flow:
acquireLock→ read → change Auth identifiers → mutate /resume→releaseLock.References